REPORT_FILE_NAME=report
REPORT_TMPDIR=tmp
REPORT_OUTPUT_DIR=pdf

pdflatex -aux-directory=$REPORT_TMPDIR -output-directory=$REPORT_OUTPUT_DIR -enable-installer -interaction=nonstopmode $REPORT_FILE_NAME.tex

cd $REPORT_TMPDIR
makeglossaries report
cd ..

#makeindex -s REPORT_TMPDIR\REPORT_FILE_NAME.ist -t REPORT_TMPDIR\REPORT_FILE_NAME.glg -o REPORT_TMPDIR\REPORT_FILE_NAME.gls REPORT_TMPDIR\REPORT_FILE_NAME.glo

pdflatex -aux-directory=$REPORT_TMPDIR -output-directory=$REPORT_OUTPUT_DIR -interaction=nonstopmode $REPORT_FILE_NAME.tex
pdflatex -aux-directory=$REPORT_TMPDIR -output-directory=$REPORT_OUTPUT_DIR  -interaction=nonstopmode $REPORT_FILE_NAME.tex
